import Layout from "@/layout";
import emptyLayout from "@/layout/emptyRouter.vue";

export default {
    path: "/base",
    meta: {
        title: "基础管理",
        roles: ["base"],
        icon: "el-icon-setting"
    },
    component: Layout,
    redirect: "/base/position-list",
    name: "base",
    children: [
        {
            path: "action",
            meta: {
                title: "权限设置",
                roles: ["base:action"],
                icon: "el-icon-s-ticket"
            },
            component: () => import("@/views/models/dev/auth/action.vue"),
            name: "ActionSetting"
        },
        {
            path: "role",
            meta: {
                title: "角色设置",
                roles: ["base:roleName"],
                icon: "el-icon-s-custom"
            },
            component: () => import("@/views/models/dev/auth/roleName.vue"),
            name: "RoleNameSetting"
        },
        {
            path: "position-list",
            meta: {
                title: "职位列表",
                roles: ["base:position-list"],
                icon: "el-icon-s-grid"
            },
            component: () => import("@/views/models/user/position/list.vue"),
            name: "PositionList"
        },
        {
            path: "admin-user",
            component: emptyLayout,
            meta: {
                title: "操作员管理",
                roles: ["base:admin-user"]
            },
            redirect: "/base/admin-user/list",
            children: [
                {
                    path: "list",
                    meta: {
                        title: "操作员列表",
                        roles: ["base:admin-user:list"],
                        icon: "el-icon-cpu"
                    },
                    component: () =>
                        import("@/views/models/user/admin/list.vue"),
                    name: "AdminUserList"
                },
                {
                    path: "add",
                    meta: {
                        title: "操作员信息",
                        roles: ["base:admin-user:add"]
                    },
                    component: () =>
                        import("@/views/models/user/admin/add.vue"),
                    name: "AdminUserAdd",
                    hidden: true
                }
            ]
        },
        {
            path: "channel-business-user",
            component: emptyLayout,
            meta: {
                title: "渠道管理员管理",
                roles: ["base:channel-business-user"]
            },
            redirect: "/base/admin-user/list",
            children: [
                {
                    path: "list",
                    meta: {
                        title: "管理员列表",
                        roles: ["base:channel-business-user:list"],
                        icon: "el-icon-cpu"
                    },
                    component: () =>
                        import("@/views/models/user/channelBusiness/list.vue"),
                    name: "ChannelBusinessUserList"
                },
                {
                    path: "add",
                    meta: {
                        title: "管理员信息",
                        roles: ["base:channel-business-user:add"]
                    },
                    component: () =>
                        import("@/views/models/user/channelBusiness/add.vue"),
                    name: "ChannelBusinessUserAdd",
                    hidden: true
                }
            ]
        }
        ,{
            path: "config",
            meta: {
                title: "系统设置",
                roles: ["base:config:list"],
                icon: "el-icon-guide"
            },
            component: () => import("@/views/models/sys/config"),
            name: "ConfigList"
        },
        {
            path: "hotword",
            meta: {
                title: "热词管理",
                roles: ["base:hotword:list"],
                icon: "el-icon-chat-dot-square"
            },
            component: () => import("@/views/models/sys/hotword"),
            name: "HotwordList"
        },
        {
            path: "hotquestion",
            meta: {
                title: "常见问题",
                roles: ["base:question:list"],
                icon: "el-icon-tickets"
            },
            component: () => import("@/views/models/sys/hotquestion"),
            name: "HotQuestionList"
        },
        {
            path: "sysDict",
            meta: {
                title: "字典管理",
                roles: ["base:dict:list"],
                icon: "el-icon-s-grid"
            },
            component: () => import("@/views/models/vrs/dict/sysDict"),
            name: "SysDict"
        },
        {
            path:"version",
            meta:{
                title:"版本管理",
                roles: ["base:version:list"],
                icon:"el-icon-s-marketing"
            },
            component:()=>import("@/views/models/sys/version.vue"),
            name:"version"
        },
        {
            path:"group",
            meta:{
                title:"平台管理",
                roles: ["base:group:list"],
                icon:"el-icon-s-marketing"
            },
            component:()=>import("@/views/models/vrs/group/group_new.vue"),
            name:"version"
        },
        {
            path: "agent",
            meta: {
                title: "代理商管理",
                roles: ["base:agent"],
                icon: "el-icon-medal-1"
            },
            component: emptyLayout,
            redirect: "/base/agent/list",
            children: [
                {
                    path: "agentUser",
                    meta: {
                        title: "代理商列表",
                        roles: ["base:agent:user:list"],
                        icon:"el-icon-s-grid"
                    },
                    component: () =>
                        import("@/views/models/sys/agent/user.vue"),
                    name: "AgentUserList"
                },

                {
                    path: "agent-level",
                    meta: {
                        title: "代理商等级",
                        roles: ["base:agent:level:list"],
                        icon:"el-icon-s-management"
                    },
                    component: () =>
                        import("@/views/models/sys/agent/level.vue"),
                    name: "AgentLevelList"
                },
                {
                    path: "agentUserAdd",
                    meta: {
                        title: "添加代理商用户",
                        roles: ["base:agent:user:add"],
                    },
                    component: () =>
                        import("@/views/models/sys/agent/add-user.vue"),
                    name: "AgentUserAdd",
                    hidden: true
                },
                {
                    path: "recharge",
                    meta: {
                        title: "代理商充值列表",
                        roles: ["base:agent:recharge"],
                        icon:"el-icon-s-goods"

                    },
                    component: () =>
                        import("@/views/models/sys/agent/recharge.vue"),
                    name: "RechargeList"
                },

            ]
        }
    ]
};
